package com.lu.adog.demo.common;

import com.lu.adog.demo.main.data.model.ItemModel;
import com.lu.adog.util.Logg;

import java.util.List;

/**
 * @author Yue
 * @date 2017/11/16 14:28
 */

public class CommonTask {


    public void genItemModelList(List<ItemModel> itemModelList, int[] names, int[] des) {

        ItemModel itemModel = null;
        int max = names.length > des.length ? names.length : des.length;

        for (int i = 0; i < max; i++) {
            ItemModel im = new ItemModel();
            if (i < des.length) {
                im.itemDescription = des[i];
            }
            if (i < names.length) {
                im.itemName = names[i];
            }
            Logg.d(">>>", im + "");
            itemModelList.add(im);
        }
    }
}
